/**
 * 
 */
package ro.dta.idbi.ui;

import java.awt.LayoutManager;

import javax.swing.JLabel;
import javax.swing.JPanel;

import ro.dta.idbi.interfaces.ui.IExecIqlDialog;
import ro.dta.idbi.interfaces.ui.IExecTransDialog;
import ro.dta.idbi.interfaces.ui.IGuiFactory;
import ro.dta.idbi.interfaces.ui.IMainFrame;
import ro.dta.idbi.interfaces.ui.ISchemaChooser;
import uk.ac.ic.doc.automed.reps.Schema;

/**
 * Default GUI factory for creating UI elements
 * 
 * Used to break dependencies between packages
 * 
 * @author Tudor Dobrila
 * 
 */
public class DefaultGUIFactory implements IGuiFactory {

	@Override
	public JLabel createTitleLabel(final String text) {
		return new JTitleLabel(text);
	}

	@Override
	public IExecTransDialog createExecTransDialog(IMainFrame parentFrame, Schema schema, boolean isTransaction) {
		return new ExecTransDialog(parentFrame, schema, isTransaction);
	}

	@Override
	public IExecIqlDialog createExecIqlDialog(IMainFrame parentFrame, Schema schema, String initialQuery) {
		return new ExecIqlDialog(parentFrame, schema, initialQuery);
	}
	
	@Override
	public JPanel createGradientPanel(LayoutManager layout) {
		return new JGradientPanel(layout);
	}

	@Override
	public ISchemaChooser createSchemaChooserPanel(String initialSchema) {
		return new SchemaChooserPanel(initialSchema);
	}

}
